{
  "properties" : { },
  "id" : "f8b902a03f7243e79216d94a6af011fb",
  "script" : null,
  "groupId" : "59a2b1b681874d929e5cd97a11fc0c59",
  "name" : "查询列表",
  "createTime" : 1727071077647,
  "updateTime" : 1726046186867,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "list",
  "method" : "GET",
  "parameters" : [ {
    "name" : "size",
    "value" : "30",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "current",
    "value" : "1",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 5,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": [\n            {\n                \"id\": \"1223445566\",\n                \"roCommunity\": \"public\",\n                \"rwCommunity\": \"public\",\n                \"snmpVersion\": \"v1\",\n                \"snmpUser\": \"测试\",\n                \"snmpPass\": \"aaaaa\",\n                \"createTime\": \"\",\n                \"port\": 161,\n                \"rowId\": 1\n            },\n            {\n                \"id\": \"1829070126826254337\",\n                \"roCommunity\": \"public\",\n                \"rwCommunity\": \"public\",\n                \"snmpVersion\": \"v1\",\n                \"snmpUser\": \"123\",\n                \"snmpPass\": \"123456\",\n                \"createTime\": \"2024-08-29 16:14:35\",\n                \"port\": 161,\n                \"rowId\": 2\n            },\n            {\n                \"id\": \"1829079262011908098\",\n                \"roCommunity\": \"public\",\n                \"rwCommunity\": \"public\",\n                \"snmpVersion\": \"\",\n                \"snmpUser\": \"\",\n                \"snmpPass\": \"\",\n                \"createTime\": \"2024-08-29 16:50:53\",\n                \"port\": \"\",\n                \"rowId\": 3\n            },\n            {\n                \"id\": \"1829083779721990144\",\n                \"roCommunity\": \"public\",\n                \"rwCommunity\": \"public\",\n                \"snmpVersion\": \"v1\",\n                \"snmpUser\": \"测试\",\n                \"snmpPass\": \"11111111\",\n                \"createTime\": \"\",\n                \"port\": 161,\n                \"rowId\": 4\n            },\n            {\n                \"id\": \"1829084567621996544\",\n                \"roCommunity\": \"public\",\n                \"rwCommunity\": \"public\",\n                \"snmpVersion\": \"v1\",\n                \"snmpUser\": \"测试\",\n                \"snmpPass\": \"11111111\",\n                \"createTime\": \"\",\n                \"port\": 161,\n                \"rowId\": 5\n            }\n        ]\n    }\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "status",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ {
        "name" : "total",
        "value" : "1",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "current",
        "value" : "1",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "size",
        "value" : "30",
        "description" : "",
        "required" : false,
        "dataType" : "Integer",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ ]
      }, {
        "name" : "records",
        "value" : "",
        "description" : "",
        "required" : false,
        "dataType" : "Array",
        "type" : "",
        "defaultValue" : "",
        "validateType" : "",
        "error" : "",
        "expression" : "",
        "children" : [ {
          "name" : "",
          "value" : "",
          "description" : "",
          "required" : false,
          "dataType" : "Object",
          "type" : "",
          "defaultValue" : "",
          "validateType" : "",
          "error" : "",
          "expression" : "",
          "children" : [ {
            "name" : "id",
            "value" : "1803683065378156545",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "port",
            "value" : "161",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "roCommunity",
            "value" : "ride@don2",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "rwCommunity",
            "value" : "private",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "snmpVersion",
            "value" : "1",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "snmpUser",
            "value" : "",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "snmpPass",
            "value" : "",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "createTime",
            "value" : "2024-06-20",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          }, {
            "name" : "rowId",
            "value" : "1",
            "description" : "",
            "required" : false,
            "dataType" : "String",
            "type" : "",
            "defaultValue" : "",
            "validateType" : "",
            "error" : "",
            "expression" : "",
            "children" : [ ]
          } ]
        } ]
      } ]
    } ]
  }
}
================================
import org.springblade.common.cache.DictCache;

var sql = """   
         select *  from auto_discover_snmp_config 
         <where>
            
            <if test=" !is_blank(roCommunity) ">
                ro_Community  like   concat('%',#{roCommunity},'%')  
            </if>

         </where>
         order by id
      """

  var pageRes = db.page(sql)

List list = pageRes.records
if (null == list) {
    return new ArrayList()
}

list.forEach(v -> {
    v.snmpVersion = DictCache.getValue("snmpVersion",v.snmpVersion::int)

})
 return  pageRes;